<?php
/**
 * Copyright 2011  SURFfoundation
 * 
 * This file is part of ESCAPE.
 * 
 * ESCAPE is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * ESCAPE is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with ESCAPE.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * For more information:
 * http://escapesurf.wordpress.com/
 * http://www.surffoundation.nl/
 * 
 * Contact: d.vierkant@utwente.nl
 * 
 * @license http://www.gnu.org/licenses/gpl.html GNU GPLv3
 */
?>
<?php
/**
 * View
 * 
 * Shared code for ESCAPE repository UI MVC views.
 */
class escape_repositoryui_View extends mvc_View
{
	protected $viewPath = 'escape/repositoryui/view/';
	
	public function displayHeader()
	{
		$templateVariables =& $this->requestAttributes['templateVariables'];
		$repositoryUi =& $this->requestAttributes['repositoryUi'];
//		$aggregation =& $this->requestAttributes['aggregation'];
//		$oreObject =& $this->requestAttributes['oreObject'];
//		
//		if($aggregation !== null)
//		{
//			$repositoryUi->setTemplateFromAggregation($aggregation);
//		}
//	
//		if($oreObject !== null)
//		{
//			// add a breadcrumb for this object
//			// link it to the show page 
//			//TODO: use the graph page instead if actionName=Graph
//			$breadCrumb = new escape_repositoryui_BreadCrumb();
//			$breadCrumb->setTitle($oreObject->getTitle());
//			$breadCrumb->setUrl('/show/' . $oreObject->getId());
//			$repositoryUi->addBreadCrumb($breadCrumb);
//		}
		
		$repositoryUi->displayPageHeader($templateVariables);
	}

	public function displayFooter()
	{
		$templateVariables =& $this->requestAttributes['templateVariables'];
		$repositoryUi =& $this->requestAttributes['repositoryUi'];
		
		$repositoryUi->displayPageFooter($templateVariables);
	}
}